package cn.billy.org.mapper;



import cn.billy.org.domain.Department;
import cn.billy.org.query.DepartmentQuery;

import java.util.List;
/**
* @Description: 持久层
* @Author: Billy
* @Version: 1.0
* @Date:  2022/6/21 21:13
*/
public interface DepartmentMapper {
    /*
    * @Title: loadAll
    * @Description: 查询全部
    * @Author: Billy
    * @Version: 1.0
    * @Date:  2022/6/21 21:12
    * @Parameters:
    * @Return List
    */
    List<Department> loadAll();

    /*
    * @Title: remove
    * @Description: 根据id进行删除
    * @Author: Billy
    * @Version: 1.0
    * @Date:  2022/6/21 21:13
    * @Parameters: id
    * @Return void
    */
    void remove(Long id);

   /*
   * @Title: add
   * @Description: 添加方法
   * @Author: Billy
   * @Version: 1.0
   * @Date:  2022/6/21 21:13
   * @Parameters: department
   * @Return void
   */
    void add(Department department);

    /*
    * @Title: update
    * @Description: 修改方法
    * @Author: Billy
    * @Version: 1.0
    * @Date:  2022/6/21 21:14
    * @Parameters: department
    * @Return void
    */
    void update(Department department);

   /*
   * @Title: getById
   * @Description: 根据id查询，返回对象
   * @Author: Billy
   * @Version: 1.0
   * @Date:  2022/6/21 21:14
   * @Parameters: id
   * @Return Department
   */
    Department getById(Long id);


   /*
   * @Title: queryData
   * @Description: 分页+高级查询
   * @Author: Billy
   * @Version: 1.0
   * @Date:  2022/6/21 21:14
   * @Parameters: departmentQuery
   * @Return List
   */
    List<Department> queryData(DepartmentQuery departmentQuery);


    /*
    * @Title: queryCount
    * @Description: 查询总条数
    * @Author: Billy
    * @Version: 1.0
    * @Date:  2022/6/21 21:15
    * @Parameters: departmentQuery
    * @Return Integer
    */
    Integer queryCount(DepartmentQuery departmentQuery);


}
